package com.laf.mall.api.service.impl;

import com.laf.mall.api.dto.MemberSetting;
import com.laf.mall.api.repository.MemberSettingRepository;
import com.laf.mall.api.service.MemberSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ygl
 * @create 2018-12-26
 * @DESCRIPTION
 **/
@Service
public class MemberSettingServiceImpl implements MemberSettingService {

    @Autowired
    private MemberSettingRepository memberSettingRepository;

    @Override
    public List<MemberSetting> findByMemberId(Integer memberId) {
        return memberSettingRepository.findByMemberId(memberId);
    }

    @Override
    public int insert(Integer memberId, Integer autoOffsetParkingRate) {
        return memberSettingRepository.insert(memberId,autoOffsetParkingRate);
    }

    @Override
    public int update(Integer memberId, Integer autoOffsetParkingRate) {
        return memberSettingRepository.update(memberId,autoOffsetParkingRate);
    }
}
